# 重命名文件序列
import os


class PathType:
    def __init__(self, path, firstCount):
        self.path = path
        self.count = firstCount
    

Paths = [PathType(r'.\no_mask', 10000), PathType(r'.\have_mask', 1000)]
for path in Paths:
    for file in os.listdir(path.path):
        Olddir = os.path.join(path.path, file)
        if os.path.isdir(Olddir):
            continue
        filename = os.path.splitext(file)[0]
        filetype = os.path.splitext(file)[1]

        Newdir = os.path.join(path.path, str(path.count) + filetype)
        os.rename(Olddir, Newdir)
        path.count+=1